package cn.supermaster.management.web.service.common;

import cn.supermaster.management.common.response.WebResponse;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * All rights Reserved, Designed By www.super-bytecode.com
 *
 * @ProjectName: supermaster-management
 * @Package: cn.supermaster.management.web.service
 * @ClassName: ICommonService
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2021/1/10 16:24
 * @Version: V1.0
 * @Copyright: 2021 www.super-bytecode.comn Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public interface ICommonService {
    /**
     * @Description: [通用下载请求]
     * <p></P>
     * @Title: doFileDownload
     * @Author: Lance Ting
     * @Date: 2021-01-10
     * @Param: request request请求对象
     * @Param: response response响应对象
     * @Param: fileName 文件名称
     * @Param: deleteFlag 删除标识
     * @Return: void
     */
    void doFileDownload(HttpServletRequest request, HttpServletResponse response, String fileName, Boolean delete);

    /**
     * @Description: [通用上传请求]
     * <p></P>
     * @Title: doUploadFile
     * @Author: Lance Ting
     * @Date: 2021-01-10
     * @Param: file
     * @Return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse doUploadFile(MultipartFile file);

    /**
     * @Description: [本地资源通用下载]
     * <p></P>
     * @Title: doResourceDownload
     * @Author: Lance Ting
     * @Date: 2021-01-10
     * @Param: request
     * @Param: response
     * @Param: resource
     * @Return: void
     */
    void doResourceDownload(HttpServletRequest request, HttpServletResponse response, String resource);
}